<template>
  <c-form-item
    prop="username"
    :rules="[
      { required: true, message: '请输入用户名', trigger: 'blur' },
      {
        min: 6,
        max: 10,
        message: '用户长度在 6 - 10之间',
        trigger: ['change', 'blur']
      }
    ]"
  >
    <template #label>用户名</template>
    <c-input placeholder="请输入用户名" v-model="state.username"></c-input>
  </c-form-item>
</template>

<script setup lang="ts">
import { reactive } from "vue";

const state = reactive({
  username: "",
  password: ""
});
</script>
